package si.cir.gui;

import si.cir.R;
import android.app.Fragment;
import android.app.FragmentManager;
import android.os.Bundle;
import android.view.Menu;

public class AipsMidActivity extends TemplateActivity {

	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        String predmet = getIntent().getStringExtra("predmet");
        
		FragmentManager fragmentManager = getFragmentManager();

		String fragmentTag = "FragmentPredmetAips";
		Fragment fragment = fragmentManager.findFragmentByTag(fragmentTag);

		if (fragment == null) {
			fragment = new AipsPredmetListFragment(predmet);
			fragmentManager.beginTransaction()
					.add(android.R.id.content, fragment, fragmentTag).commit();
		}
    }

    @Override
    public boolean onPrepareOptionsMenu(Menu menu) {
    	super.onPrepareOptionsMenu(menu);
    	menu.findItem(R.id.home).setVisible(true);
    	menu.findItem(R.id.stuk).setVisible(true);
    	menu.findItem(R.id.soum).setVisible(true);
    	menu.findItem(R.id.vreme).setVisible(true);
    	return true;
    }

}
